﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Jinjia.Approve.Entity.Entity.JJFlow;
using Jinjia.Approve.Model.VM.JJFlow;

namespace Jinjia.Approve.IService.JJFlow
{
    public interface IJJFlowTrackService
    {
        Task<int> Save(JjFlowTrackVM data);

        Task Save(List<JjFlowTrackVM> data);

        Task RecordTrackInfo(Node next_node, int instance_id, int operate_user_id, int op_type, int user_id, string remark = "", int is_auto = 0);

        /// <summary>
        /// 查找审批记录
        /// </summary>
        /// <param name="instance_id"></param>
        /// <returns></returns>
        Task<bool> GetApproveTrackModelByInstanceId(int instance_id);

        Task<List<JjFlowTrackVM>> GetFlowTrackHistory(string biz_order_id, string modular_key, int flow_instance_id);

        /// <summary>
        /// 查询轨迹流程
        /// </summary>
        /// <param name="flow_instance_id"></param>
        /// <returns></returns>
        Task<List<JjFlowTrackVM>> GetFlowTrackById(int flow_instance_id);

        Task<List<JjFlowTrackVM>> GetListByInstanceId(int instance_id);

        Task<List<JjFlowTrackVM>> GetListAsync(Expression<Func<jj_flow_track, bool>> predicate);
    }
}